<?php
	use yii\helpers\Html;
	use yii\helpers\Url;
	use yii\widgets\ActiveForm;
?>

<div class="page-header">
	<h1>
		客户管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			<!-- Common form elements and layouts -->
			 添加客户
		</small>
	</h1>
</div><!-- /.page-header -->
<style>
	.list {
		list-style: none;
		margin-bottom: 20px;
	}
	.list .item {
		width: 30%;
	}

	.list .item select {
		width:159px;
	}
	

	.fl {
		float: left;
	}
	.clearfix:before,.clearfix:after {
	    content: "";
	    display: table;
	}
	.clearfix:after {
	    clear: both;
	}
	.clearfix {
	    *zoom:1, 
	}
	.list .item span{
		color: red;
	}
	.list .item .bttn {
		width: 25%;
	    height: 36px;
	    color: #fff;
	    font-size: 1.2em;
	    background: #438EB9;
	    border: none;
	}
</style>
<div class="row">

		<?php $form = ActiveForm::begin([
			'enableClientValidation' => true,
			'method' => 'post',
			'options' => ['class'=>'form-horizontal'],
			'fieldConfig' => [
				'template' => "{label}<li>{input}</li>"
			],

		])?>
		
		<ul class="list clearfix">
			<li class="item fl">
				<span>*</span>日&#12288;&#12288;期：
				<input type="text" name="Cus[visitTime]" value="<?= date('Y-m-d',$model['visitTime'])?>">
			</li>
			<li class="item fl">
				工作区域：
				<select name="data[jobarea]" id="">
					
						<option value=""><?= $model['jobarea']?></option>
					
				</select>
			</li>
			<li class="item fl">
				意向间隔：
				<select name="data[huxing]" id="">
					
						<option value=""><?= $model['huxing']?></option>
					
				</select>
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl">
				<span>*</span>姓&#12288;&#12288;名：
				<input type="text" name="Cus[name]" value="<?= $model['name']?>" readonly>
			</li>
			<li class="item fl">
				居住区域：
				<select name="data[area]" >
					
						<option value=""><?= $model['area']?></option>
					
				</select>
			</li>
			<li class="item fl">
				意向单价：
				<input type="text" name="data[price]" value="<?= $model['price']?>"> 
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl">
				<span>*</span>性&#12288;&#12288;别：
				<input style="height:20px;width:20px;" name="Cus[gender]" value="1" <?php if($model['gender']==1):?> checked <?php endif;?>type="radio">男&nbsp;&nbsp;&nbsp;
				<input style="height:20px;width:20px;" name="Cus[gender]" value="2" <?php if($model['gender']==2):?> checked <?php endif;?> type="radio">女
			</li>
			<li class="item fl">
				获悉渠道：
				<select name="data[knowWay]" >
					
						<option value=""><?= $model['konwWay']?></option>
					
				</select>
			</li>
			<li class="item fl">
				意向总价：
				<input type="text" name="data[totalprice]" value="<?= $model['totalprice']?>">
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl">
				<span>&nbsp;&nbsp;</span>年&#12288;&#12288;龄：
				<input type="text" name="Cus[age]" value="<?= $model['age']?>">
			</li>
			<li class="item fl">
				产品类型：
				<select name="data['floortype']" id="">
					
						<option value=""></option>
					
				
				</select>
			</li>
			<li class="item fl">
				置业目的：
				<select name="data[purpose]" >
					
						<option value=""><?= $model['purpose']?></option>
					
				</select>
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl">
				<span>*</span>联系电话：
				<input type="text" name="Cus[phone]" value="<?= $model['phone']?>" required>
			</li>
			<li class="item fl">
				意向楼层：
				<input type="text" name="data[floor]" value="<?= $model['floor']?>">
			</li>
			<li class="item fl">
				购房意向度：
				<select name="Cus[degree]" style="width:146px;">
					
						<option value=""><?= $model['degree']?></option>
					
				</select>
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl">
				<span>&nbsp;&nbsp;</span>工作行业：
				<select name="data[job]">
					
						<option value=""><?= $model['job']?></option>
					
				</select>
			</li>
			<li class="item fl">
				需求面积：
				<input type="text" name="Cus[area]" value="<?= $model['area']?>">
			</li>
			<li class="item fl">
				筹&#12288;&#12288;号：
				<input type="text" name="Cus[tag]" value="<?= $model['tag']?>">
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl">
				<span>&nbsp;&nbsp;</span>联系地址：
				<input type="text" name="Cus[address]" value="<?= $model['address']?>">
			</li>
			<li class="item fl">
				电子邮箱：
				<input type="text" name="Cus[email]" value="<?= $model['email']?>">
			</li>
			<li class="item fl">
				身份证号：
				<input type="text" name="Cus[IDNo]" value="<?= $model['IDNo']?>">
			</li>
		</ul>
		<ul class="list clearfix">
			<li class="item fl" style="width:60%;">
				<span style="vertical-align:top; color:black; width:20%">&nbsp;&nbsp;备&#12288;&#12288;注：</span>
				<textarea name="Cus[desc]" style="width:80%;height:100px;"><?= $model['desc']?></textarea>
			</li>
			<li class="item fl" style="width:30%;">
				邮&#12288;&#12288;编：
				<input type="text" name="Cus[zipcode]" value="<?= $model['zipcode']?>">
			</li>
			<li class="item fl" style="margin-top:3%;">
				<!-- <input class="bttn" type="submit" value="保存"> -->
				<a href="javascript:history.go(-1);">
					
					<input class="bttn" type="button" style="margin-left:10%;" value="返回">
				</a>
			</li>
		</ul>
		<?php ActiveForm::end();?>

		<?php
			if(Yii::$app->session->hasFlash('info')):
		?>
			<script type="text/javascript">
				alert('<?php echo Yii::$app->session->getFlash('info')?>');
			</script>
		<?php endif?>

</div>

<script src="./ace/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">

</script>

